#!/bin/bash
## kola:
##   # Read only test thus safe to run in parallel
##   exclusive: false
##   description: Verify that we're using the sqlite rpmdb backend
##     for RHCOS 9+ and FCOS 33+.

# See https://github.com/coreos/fedora-coreos-tracker/issues/623

set -xeuo pipefail

# shellcheck disable=SC1091
. "$KOLA_EXT_DATA/commonlib.sh"

if is_rhcos8; then
    ok "nothing to check for RHCOS 8"
    exit 0
fi

if [ ! -f /usr/share/rpm/rpmdb.sqlite ]; then
    fatal "Didn't find file /usr/share/rpm/rpmdb.sqlite"
fi
ok rpmdb is sqlite
